Symlink path can be followed manually, but `cd` returns Permission denied

Posted by Ricket on Super User See other posts from Super User or by Ricket
Published on 2012-11-26T16:53:53Z Indexed on 2012/11/26 17:08 UTC
Read the original article Hit count: 193

Filed under:
|
|

I am trying to access the directory /usr/software/test/agnostic. There are several symlinks involved in this path. As you can see by the below transcript, I am unable to cd directly to the path, but I can check each step of the way and cd to the symlinked directories until I reach the destination. Why is this? (and how do I fix it?)

Ubuntu 12.10, bash

> ls /usr/software/test/agnostic
ls: cannot access /usr/software/test/agnostic: Permission denied

> cd /usr/software/test

> cd agnostic
bash: cd: agnostic: Permission denied

> pwd -P
/x/eng/localtest/arch/x86_64-redhat-rhel5

> ls -al | grep agnostic
lrwxrwxrwx  1 root  root    15 Oct 23  2007 agnostic -> noarch/agnostic

> ls -al | grep noarch
...
lrwxrwxrwx  1 root  root    23 Oct 23  2007 noarch -> /x/eng/localtest/noarch

> cd noarch

> cd agnostic
bash: cd: agnostic: Permission denied

> ls -al | grep agnostic
lrwxrwxrwx   1   5808 dip         4 Oct  5  2010 agnostic -> main

> cd main

> ls
(correct output of `ls`)

> pwd
/usr/software/test/noarch/main

> pwd -P
/x/eng/localtest/noarch/main

© Super User or respective owner

Related posts about ubuntu

Related posts about bash